﻿@model Sample.Mvc3.Models.LogOnModel
@{
    ViewBag.Title = "登录";
}
<h2>
    登录</h2>
<p>
    请输入用户名和密码。如果您没有帐户，请 <a href="http://weibo.com/signup/signup.php" target="_blank">注册</a>。
</p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@Html.ValidationSummary(true, "登录不成功。请更正错误并重试。")
@using (Html.BeginForm())
{
    <div style="float: right; width: 45%; height: 100%; margin-left: 20px;">
        <fieldset>
            <legend>微博连接登录</legend>
            <div class="display-label">
                <a id="logonlink" href="@Openapi.Weibo.Client.GetAuthorizeURI(state:Guid.NewGuid().ToString())">
                    <img src="/Images/wbutton240.png" alt="微博登录" />
                </a>
            </div>
        </fieldset>
    </div>
    <div style="">
        <fieldset>
            <legend>模拟登录</legend>
            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>
            <div class="editor-label">
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe)
            </div>
            <p>
                <input type="submit" value="登录" />
            </p>
        </fieldset>
    </div>
    <div style="clear: both;">
    </div>
}
